package com.spring.sunflower.conversation

import com.spring.sunflower.base.BaseObserver
import com.spring.sunflower.base.BasePresenter
import com.spring.sunflower.bean.ChatPeopleBean
import com.spring.sunflower.main.MainContract

/**
 * Created by Kevin on 2021/9/1<br/>
 *
 * Describe:<br/>
 */
class MessagePresenter(baseView: MainContract.MessageView) :
    BasePresenter<MainContract.MessageView>(baseView) {
    fun getChatPeople(first:Boolean) {
        val observable = requestDataSource.chatPeople
        addDisposable(observable, object : BaseObserver<ChatPeopleBean>() {
            override fun onSuccess(bean: ChatPeopleBean) {
                baseView.showChatPeople(bean.datas,first)
            }

            override fun onError(status: Int, msg: String?) {
            }
        })
    }
}